if ((sprite(i).left < thisSprite.left) and (sprite(i).right > thisSprite.right)) or ((sprite(i).top < thisSprite.top) and (sprite(i).bottom > thisSprite.bottom)) then
return "Turns sprite into a sliding 'thumb' for sound volume control."
end
on getBehaviorDescription me
return "CHANNEL VOLUME SLIDER" & RETURN & RETURN & "Drop this behavior onto a graphic sprite to turn it into a sliding 'thumb' that controls the volume of a sound." & RETURN & RETURN & "Select the sound channel that the slider will control, the sprite that defines the movement of the slider, and the starting volume of the sound." & RETURN & RETURN & "This behavior can control sound channels 1 to 8 (multiple copies of the behavior can be used to control more than one channel at a time). " & "The sprite used as the 'thumb' moves horizontally or vertically, with the right or top position being the maximum volume position. " & "The direction of movement is defined by the sprite chosen as a constraint. " & "The constraint sprite must be in a lower-numbered channel than the 'thumb', and it must be at least slightly larger than the 'thumb'. " & "A constraint sprite that is wider than it is tall will cause the 'thumb' to move horizontally; a taller constraint sprite creates a vertical movement. " & "The stage may also be used as a constraint (and is the default if the chosen constraint has been moved, deleted, or resized). " & "The sound volume ranges from silent (0) to maximum (255)." & RETURN & RETURN & "PERMITTED MEMBER TYPES:" & RETURN & "Graphics." & RETURN & RETURN & "PARAMETERS:" & RETURN & "* Sound channel - determines which sound channel this slider controls." & RETURN & "* Constraining sprite - determines direction and distance of slider movement (setting of 0 uses stage for constraint)." & RETURN & "* Initial sound volume - volume used for sound channel when slider first appears."